package com.liaowei.article.controller;

import com.liaowei.article.service.ArticleTagService;
import com.liaowei.common.BaseResponse;
import com.liaowei.common.ResultUtils;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("tags")
@RequiredArgsConstructor
public class ArticleTagController {

    private final ArticleTagService articleTagService;


    // 根据标签id删除用户标签记录
    @DeleteMapping("{tagId}")
    public BaseResponse<String> deleteByTagId(@PathVariable long tagId){
        return ResultUtils.success(articleTagService.deleteByTagId(tagId));
    }
}
